
#include "organ/Organ.h"
#include "OrganSession.h"
#include "communication/DataPacket.h"

OrganSession::OrganSession(Organ* pOwner)
{
	m_pOwner = pOwner;
}
OrganSession::~OrganSession()
{

}
bool OrganSession::HandlePacket(DataPacket* packet)
{
	m_pOwner->OnReceive( (const char*)packet->contents(), packet->size());
	m_pOwner->OnReceive( *packet );
	return true;
}

void OrganSession::OnConnect(int32 errorCode)
{
	m_pOwner->OnReady( errorCode );
}
void OrganSession::OnDisconnect(int32 errorCode)
{
	m_pOwner->OnReady( errorCode );
}